<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="app">
        <li v-for='item in fruits'>{{item}}</li>
        <li v-for='(item,index) in  fruits'>{{item + '----' + index}}</li>
        -----------------------
        <li :key='item.id' v-for='(item,index) in myFruits '>
            <span>{{item.ename}}</span>
            <span>{{item.cname}}</span>
        </li>
        -----------------------
        <div v-if='v=="zhangsan"' v-for='(v,k,i) in obj'>{{v + '---' + k + '---' + i}}</div>
    </ul>
    <script src="./js/vue.js"></script>
    <script>
        var vm = new Vue({
      el: '#app',
      data: {
        fruits: ['apple', 'orange', 'banana'],
        myFruits: [{
          id: 1,
          ename: 'apple',
          cname: '苹果'
        },{
          id: 2,
          ename: 'orange',
          cname: '橘子'
        },{
          id: 3,
          ename: 'banana',
          cname: '香蕉'
        }],
        obj: {
          uname: 'zhangsan',
          age: 13,
          gender: 'female'
        }
      }
    })
    </script>
</body>
</html>